import type { GeneratedEtsLibFile } from "../../types/generated";

export const FILE: GeneratedEtsLibFile = {
  path: 'ets/api/@ohos.graphics.text.d.ts',
  content: "/*\n * Copyright (c) 2024 Huawei Device Co., Ltd.\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n/**\n * @file\n * @kit ArkGraphics2D\n */\nimport type drawing from './@ohos.graphics.drawing';\nimport type common2D from './@ohos.graphics.common2D';\n/**\n * The Text module provides a set of APIs for text layout and font management.\n * It aims to deliver high-quality typesetting through features like character-to-glyph\n * conversion, kerning, line breaking, alignment, and text measurement. Additionally,\n * it provides font management capabilities, including font registration, font descriptors,\n * and font collection management.\n *\n * This module provides the following classes for creating complex text paragraphs:\n *\n * TextStyle: defines the font type, size, spacing, and other text properties.\n * FontCollection: manages a collection of different fonts.\n * FontDescriptor: provides information about font descriptors.\n * ParagraphStyle: controls line break and word break strategies for the entire paragraph.\n * ParagraphBuilder: used to create different paragraph objects.\n * Paragraph: created by calling build() of the ParagraphBuilder class.\n * LineTypeset: created by calling buildLineTypeset() of the ParagraphBuilder class.\n * TextLine: paragraph text on a line-by-line basis, obtained by calling getTextLines() of the Paragraph class.\n * Run: text typesetting unit, obtained by calling getGlyphRuns() of the TextLine class.\n *\n * @namespace text\n * @syscap SystemCapability.Graphics.Drawing\n * @since 12\n */\ndeclare namespace text {\n    /**\n     * Refers to how to align the horizontal position of text when displaying text.\n     * @enum { number }\n     * @syscap SystemCapability.Graphics.Drawing\n     * @since 12\n     */\n    enum TextAlign {\n        /**\n         * Use the left side of the text as a reference line for alignment.\n         * @syscap SystemCapability.Graphics.Drawing\n         * @since 12\n         */\n        LEFT = 0,\n        /**\n         * Use the right side of the text as a reference line for alignment.\n         * @syscap SystemCapability.Graphics.Drawing\n         * @since 12\n         */\n        RIGHT = 1,\n        /**\n         * Use the midpoint line the text as a reference line for alignment.\n         * @syscap SystemCapability.Graphics.Drawing\n         * @since 12\n         */\n        CENTER = 2,\n        /**\n         * Justified, which means that each line (except the last line) is stretched so that every line has equal width,\n         * and the left and right margins are straight.\n         * @syscap SystemCapability.Graphics.Drawing\n         * @since 12\n         */\n        JUSTIFY = 3,\n        /**\n         * Align text from start, based on the TextDirection, such as left-to-right or right-to-left.\n         * @syscap SystemCapability.Graphics.Drawing\n         * @since 12\n         */\n        START = 4,\n        /**\n         * Align text from end, based on the TextDirection, such as left-to-right or right-to-left, opposite to START.\n         * @syscap SystemCapability.Graphics.Drawing\n         * @since 12\n         */\n        END = 5\n    }\n    /**\n     * Enumerate text runs direction.\n     * @enum { number }\n     * @syscap SystemCapability.Graphics.Drawing\n     * @since 12\n     */\n    enum TextDirection {\n        /**\n         * The text is oriented from right to left.\n         * @syscap SystemCapability.Graphics.Drawing\n         * @since 12\n         */\n        RTL,\n        /**\n         * The text is oriented from left to right.\n         * @syscap SystemCapability.Graphics.Drawing\n         * @since 12\n         */\n        LTR\n    }\n    /**\n     * Enumerate text segmentation strategy.\n     * @enum { number }\n     * @syscap SystemCapability.Graphics.Drawing\n     * @since 12\n     */\n    enum BreakStrategy {\n        /**\n         * Fills the current line as much as possible without adding hyphens.\n         * @syscap SystemCapability.Graphics.Drawing\n         * @since 12\n         */\n        GREEDY,\n        /**\n         * Optimizes layout and may add hyphens when necessary.\n         * @syscap SystemCapability.Graphics.Drawing\n         * @since 12\n         */\n        HIGH_QUALITY,\n        /**\n         * Ensures consistent line width in a paragraph, adding hyphens if needed.\n         * @syscap SystemCapability.Graphics.Drawing\n         * @since 12\n         */\n        BALANCED\n    }\n    /**\n     * Enumerate word break strategy.\n     * @enum { number }\n     * @syscap SystemCapability.Graphics.Drawing\n     * @since 12\n     */\n    enum WordBreak {\n        /**\n         * Default mode that break words based on language-specific conventions.\n         * @syscap SystemCapability.Graphics.Drawing\n         * @since 12\n         */\n        NORMAL,\n        /**\n         * Allows breaks within any character in non-CJK text. (CJK means Chinese, Japanese, and Korean.)\n         * This value is suitable for Asian text that contains some non-Asian text. For example,\n         * it can be used to break consecutive English characters.\n         * @syscap SystemCapability.Graphics.Drawing\n         * @since 12\n         */\n        BREAK_ALL,\n        /**\n         * Allows breaks between any two characters in non-CJK text. It prioritizes breaking at whitespace\n         * or other natural breakpoints to keep words intact. If no breakpoints are found, it breaks between\n         * any two characters. For CJK text, this behaves like NORMAL.\n         * @syscap SystemCapability.Graphics.Drawing\n         * @since 12\n         */\n        BREAK_WORD,\n        /**\n         * Attempts to break words at the end of a line using a hyphen. If a hyphen cannot be added,\n         * it behaves like BREAK_WORD.\n         * @syscap SystemCapability.Graphics.Drawing\n         * @since 18\n         */\n        BREAK_HYPHEN\n    }\n    /**\n     * Describes a text decoration.\n     * @typedef Decoration\n     * @syscap SystemCapability.Graphics.Drawing\n     * @since 12\n     */\n    interface Decoration {\n        /**\n         * Type of the decoration. The default value is NONE.\n         * @type { ?TextDecorationType }\n         * @syscap SystemCapability.Graphics.Drawing\n         * @since 12\n         */\n        textDecoration?: TextDecorationType;\n        /**\n         * Color of the decoration. The default value is transparent.\n         * @type { ?common2D.Color }\n         * @syscap SystemCapability.Graphics.Drawing\n         * @since 12\n         */\n        color?: common2D.Color;\n        /**\n         * Style of the decoration. The default value is SOLID.\n         * @type { ?TextDecorationStyle }\n         * @syscap SystemCapability.Graphics.Drawing\n         * @since 12\n         */\n        decorationStyle?: TextDecorationStyle;\n        /**\n         * Scale factor for the thickness of the decoration line. The value is a floating point number.\n         * The default value is 1.0.\n         * @type { ?number }\n         * @syscap SystemCapability.Graphics.Drawing\n         * @since 12\n         */\n        decorationThicknessScale?: number;\n    }\n    /**\n     * Enumerates the text decoration types.\n     * @enum { number }\n     * @syscap SystemCapability.Graphics.Drawing\n     * @since 12\n     */\n    enum TextDecorationType {\n        /**\n         * There are no text decoration.\n         * @syscap SystemCapability.Graphics.Drawing\n         * @since 12\n         */\n        NONE,\n        /**\n         * There is a decoration line below the text.\n         * @syscap SystemCapability.Graphics.Drawing\n         * @since 12\n         */\n        UNDERLINE,\n        /**\n         * There is a decoration line above the text.\n         * @syscap SystemCapability.Graphics.Drawing\n         * @since 12\n         */\n        OVERLINE,\n        /**\n         * There is a decoration line through the middle of the text.\n         * @syscap SystemCapability.Graphics.Drawing\n         * @since 12\n         */\n        LINE_THROUGH\n    }\n    /**\n     * Enumerates the text decoration styles.\n     * @enum { number }\n     * @syscap SystemCapability.Graphics.Drawing\n     * @since 12\n     */\n    enum TextDecorationStyle {\n        /**\n         * Decoration line is solid line.\n         * @syscap SystemCapability.Graphics.Drawing\n         * @since 12\n         */\n        SOLID,\n        /**\n         * Decoration line is double line.\n         * @syscap SystemCapability.Graphics.Drawing\n         * @since 12\n         */\n        DOUBLE,\n        /**\n         * Decoration line is dotted line.\n         * @syscap SystemCapability.Graphics.Drawing\n         * @since 12\n         */\n        DOTTED,\n        /**\n         * Decoration line is dashed line.\n         * @syscap SystemCapability.Graphics.Drawing\n         * @since 12\n         */\n        DASHED,\n        /**\n         * Decoration line is wavy line.\n         * @syscap SystemCapability.Graphics.Drawing\n         * @since 12\n         */\n        WAVY\n    }\n    /**\n     * Enumeration of font weight of text.\n     * @enum { number }\n     * @syscap SystemCapability.Graphics.Drawing\n     * @since 12\n     */\n    enum FontWeight {\n        /**\n         * Thin\n         * @syscap SystemCapability.Graphics.Drawing\n         * @since 12\n         */\n        W100,\n        /**\n         * Extra-light\n         * @syscap SystemCapability.Graphics.Drawing\n         * @since 12\n         */\n        W200,\n        /**\n         * Light\n         * @syscap SystemCapability.Graphics.Drawing\n         * @since 12\n         */\n        W300,\n        /**\n         * Normal/Regular\n         * @syscap SystemCapability.Graphics.Drawing\n         * @since 12\n         */\n        W400,\n        /**\n         * Medium\n         * @syscap SystemCapability.Graphics.Drawing\n         * @since 12\n         */\n        W500,\n        /**\n         * Semi-bold\n         * @syscap SystemCapability.Graphics.Drawing\n         * @since 12\n         */\n        W600,\n        /**\n         * Bold\n         * @syscap SystemCapability.Graphics.Drawing\n         * @since 12\n         */\n        W700,\n        /**\n         * Extra-bold\n         * @syscap SystemCapability.Graphics.Drawing\n         * @since 12\n         */\n        W800,\n        /**\n         * Black\n         * @syscap SystemCapability.Graphics.Drawing\n         * @since 12\n         */\n        W900\n    }\n    /**\n     * Enumeration of font style of text.\n     * @enum { number }\n     * @syscap SystemCapability.Graphics.Drawing\n     * @since 12\n     */\n    enum FontStyle {\n        /**\n         * Upright font type.\n         * @syscap SystemCapability.Graphics.Drawing\n         * @since 12\n         */\n        NORMAL,\n        /**\n         * Slant font. If no italic version is available for the current font, the oblique version will be used instead.\n         * @syscap SystemCapability.Graphics.Drawing\n         * @since 12\n         */\n        ITALIC,\n        /**\n         * Oblique font. If no oblique version is available for the current font, the italic version will be used instead.\n         * @syscap SystemCapability.Graphics.Drawing\n         * @since 12\n         */\n        OBLIQUE\n    }\n    /**\n     * Enumeration of font width of text.\n     * @enum { number }\n     * @syscap SystemCapability.Graphics.Drawing\n     * @since 12\n     */\n    enum FontWidth {\n        /**\n         * Ultra condensed font width.\n         * @syscap SystemCapability.Graphics.Drawing\n         * @since 12\n         */\n        ULTRA_CONDENSED = 1,\n        /**\n         * Extra condensed font width.\n         * @syscap SystemCapability.Graphics.Drawing\n         * @since 12\n         */\n        EXTRA_CONDENSED = 2,\n        /**\n         * Condensed font width.\n         * @syscap SystemCapability.Graphics.Drawing\n         * @since 12\n         */\n        CONDENSED = 3,\n        /**\n         * Semi condensed font width.\n         * @syscap SystemCapability.Graphics.Drawing\n         * @since 12\n         */\n        SEMI_CONDENSED = 4,\n        /**\n         * Normal font width.\n         * @syscap SystemCapability.Graphics.Drawing\n         * @since 12\n         */\n        NORMAL = 5,\n        /**\n         * Semi expanded font width.\n         * @syscap SystemCapability.Graphics.Drawing\n         * @since 12\n         */\n        SEMI_EXPANDED = 6,\n        /**\n         * Expanded font width.\n         * @syscap SystemCapability.Graphics.Drawing\n         * @since 12\n         */\n        EXPANDED = 7,\n        /**\n         * Extra expanded font width.\n         * @syscap SystemCapability.Graphics.Drawing\n         * @since 12\n         */\n        EXTRA_EXPANDED = 8,\n        /**\n         * Ultra expanded font width.\n         * @syscap SystemCapability.Graphics.Drawing\n         * @since 12\n         */\n        ULTRA_EXPANDED = 9\n    }\n    /**\n     * Enumerates the text height modifier patterns.\n     * @enum { number }\n     * @syscap SystemCapability.Graphics.Drawing\n     * @since 12\n     */\n    enum TextHeightBehavior {\n        /**\n         * Allows the first line of the paragraph to rise and the last line to drop.\n         * @syscap SystemCapability.Graphics.Drawing\n         * @since 12\n         */\n        ALL = 0x0,\n        /**\n         * Prevents the first line of a paragraph from rising.\n         * @syscap SystemCapability.Graphics.Drawing\n         * @since 12\n         */\n        DISABLE_FIRST_ASCENT = 0x1,\n        /**\n         * Prevents the last line of a paragraph from dropping.\n         * @syscap SystemCapability.Graphics.Drawing\n         * @since 12\n         */\n        DISABLE_LAST_ASCENT = 0x2,\n        /**\n         * Combines the effects of disabling the first line from rising and the last line from dropping.\n         * @syscap SystemCapability.Graphics.Drawing\n         * @since 12\n         */\n        DISABLE_ALL = 0x1 | 0x2\n    }\n    /**\n     * Enumeration the type of text baseline.\n     * @enum { number }\n     * @syscap SystemCapability.Graphics.Drawing\n     * @since 12\n     */\n    enum TextBaseline {\n        /**\n         * The alphabetic baseline, typically used for Latin-based scripts where the baseline aligns\n         * with the base of lowercase letters.\n         * @syscap SystemCapability.Graphics.Drawing\n         * @since 12\n         */\n        ALPHABETIC,\n        /**\n         * The ideographic baseline, commonly used for ideographic scripts such as Chinese, Japanese, and Korean,\n         * where the baseline aligns with the center of characters.\n         * @syscap SystemCapability.Graphics.Drawing\n         * @since 12\n         */\n        IDEOGRAPHIC\n    }\n    /**\n     * Enumerates of ellipsis mode.\n     * EllipsisMode.START and EllipsisMode.MIDDLE take effect only when text overflows in a single line.\n     * @enum { number }\n     * @syscap SystemCapability.Graphics.Drawing\n     * @since 12\n     */\n    enum EllipsisMode {\n        /**\n         * Places the ellipsis in the text header. It is valid only when maxLines is set to 1 in ParagraphStyle.\n         * @syscap SystemCapability.Graphics.Drawing\n         * @since 12\n         */\n        START,\n        /**\n         * Places the ellipsis in the middle of the text. It is valid only when maxLines is set to 1 in ParagraphStyle.\n         * @syscap SystemCapability.Graphics.Drawing\n         * @since 12\n         */\n        MIDDLE,\n        /**\n         * Places the ellipsis at the end of the text.\n         * @syscap SystemCapability.Graphics.Drawing\n         * @since 12\n         */\n        END\n    }\n    /**\n     * Describes shadow of text.\n     * @typedef TextShadow\n     * @syscap SystemCapability.Graphics.Drawing\n     * @since 12\n     */\n    interface TextShadow {\n        /**\n         * Color of the text shadow. The default value is black (255, 0, 0, 0).\n         * @type { ?common2D.Color } The color of text shadow\n         * @syscap SystemCapability.Graphics.Drawing\n         * @since 12\n         */\n        color?: common2D.Color;\n        /**\n         * Position of the text shadow relative to the text.\n         * The horizontal and vertical coordinates must be greater than or equal to 0.\n         * @type { ?common2D.Point } The point of shadow\n         * @syscap SystemCapability.Graphics.Drawing\n         * @since 12\n         */\n        point?: common2D.Point;\n        /**\n         * The value sets special effect radius of blurring text.\n         * The value is a floating point number. The default value is 0.0px.\n         * @type { ?number } The value about radius of blur, it type is \"double\"\n         * @syscap SystemCapability.Graphics.Drawing\n         * @since 12\n         */\n        blurRadius?: number;\n    }\n    /**\n     * Describes the style of a rectangle.\n     * @typedef RectStyle\n     * @syscap SystemCapability.Graphics.Drawing\n     * @since 12\n     */\n    interface RectStyle {\n        /**\n         * Color of the rectangle.\n         * @type { common2D.Color } The color of rect style\n         * @syscap SystemCapability.Graphics.Drawing\n         * @since 12\n         */\n        color: common2D.Color;\n        /**\n         * Left top radius of the rectangle.\n         * @type { number } it is double type data\n         * @syscap SystemCapability.Graphics.Drawing\n         * @since 12\n         */\n        leftTopRadius: number;\n        /**\n         * Right top radius of the rectangle.\n         * @type { number } it is double type data\n         * @syscap SystemCapability.Graphics.Drawing\n         * @since 12\n         */\n        rightTopRadius: number;\n        /**\n         * Right bottom radius of the rectangle.\n         * @type { number } it is double type data\n         * @syscap SystemCapability.Graphics.Drawing\n         * @since 12\n         */\n        rightBottomRadius: number;\n        /**\n         * Left bottom radius of the rectangle.\n         * @type { number } it is double type data\n         * @syscap SystemCapability.Graphics.Drawing\n         * @since 12\n         */\n        leftBottomRadius: number;\n    }\n    /**\n     * Describes font feature of text.\n     * @typedef FontFeature\n     * @syscap SystemCapability.Graphics.Drawing\n     * @since 12\n     */\n    interface FontFeature {\n        /**\n         * String identified by the keyword in the font feature key-value pair.\n         * @type { string } feature name\n         * @syscap SystemCapability.Graphics.Drawing\n         * @since 12\n         */\n        name: string;\n        /**\n         * \tValue in the font feature key-value pair.\n         * @type { number } feature value\n         * @syscap SystemCapability.Graphics.Drawing\n         * @since 12\n         */\n        value: number;\n    }\n    /**\n     * Describes font variation of text.\n     * @typedef FontVariation\n     * @syscap SystemCapability.Graphics.Drawing\n     * @since 12\n     */\n    interface FontVariation {\n        /**\n         * String identified by the keyword in the font variation key-value pair.\n         * @type { string } variation axis\n         * @syscap SystemCapability.Graphics.Drawing\n         * @since 12\n         */\n        axis: string;\n        /**\n         * Value in the font variation key-value pair.\n         * @type { number } variation value\n         * @syscap SystemCapability.Graphics.Drawing\n         * @since 12\n         */\n        value: number;\n    }\n    /**\n     * Describes badge type of text.\n     * @enum { number }\n     * @syscap SystemCapability.Graphics.Drawing\n     * @since 20\n     */\n    enum TextBadgeType {\n        /**\n         * No badge.\n         * @syscap SystemCapability.Graphics.Drawing\n         * @since 20\n         */\n        TEXT_BADGE_NONE,\n        /**\n         * Super badge.\n         * @syscap SystemCapability.Graphics.Drawing\n         * @since 20\n         */\n        TEXT_SUPERSCRIPT,\n        /**\n         * Sub badge.\n         * @syscap SystemCapability.Graphics.Drawing\n         * @since 20\n         */\n        TEXT_SUBSCRIPT\n    }\n    /**\n     * Describes text style.\n     * @typedef TextStyle\n     * @syscap SystemCapability.Graphics.Drawing\n     * @since 12\n     */\n    interface TextStyle {\n        /**\n         * Text decoration. By default, no decoration is used.\n         * @type { ?Decoration } decoration for text\n         * @syscap SystemCapability.Graphics.Drawing\n         * @since 12\n         */\n        decoration?: Decoration;\n        /**\n         * Text color. The default color is white.\n         * @type { ?common2D.Color } it is uint32_t type data\n         * @syscap SystemCapability.Graphics.Drawing\n         * @since 12\n         */\n        color?: common2D.Color;\n        /**\n         * Font weight. The default value is W400. Currently, only the default system font supports font weight adjustment.\n         * For other fonts, if the weight is less than semi-bold (W600), there is no variation in stroke thickness.\n         * If the weight is greater than or equal to semi-bold, it might result in a fake bold effect.\n         * @type { ?FontWeight } it is uint32_t type data\n         * @syscap SystemCapability.Graphics.Drawing\n         * @since 12\n         */\n        fontWeight?: FontWeight;\n        /**\n         * Font style. The default value is NORMAL.\n         * @type { ?FontStyle } it is uint32_t type data\n         * @syscap SystemCapability.Graphics.Drawing\n         * @since 12\n         */\n        fontStyle?: FontStyle;\n        /**\n         * Text baseline type. The default value is ALPHABETIC.\n         * @type { ?TextBaseline } it is uint32_t type data\n         * @syscap SystemCapability.Graphics.Drawing\n         * @since 12\n         */\n        baseline?: TextBaseline;\n        /**\n         * Array of font families. By default, the array is empty, indicating that all system fonts are matched.\n         * @type { ?Array<string> } fontfamily gather\n         * @syscap SystemCapability.Graphics.Drawing\n         * @since 12\n         */\n        fontFamilies?: Array<string>;\n        /**\n         * Font size, in units of px. The value is a floating point number. The default value is 14.0.\n         * @type { ?number } it is double type data\n         * @syscap SystemCapability.Graphics.Drawing\n         * @since 12\n         */\n        fontSize?: number;\n        /**\n         * Letter spacing, in units of px. The value is a floating point number.\n         * The default value is 0.0. A positive value causes characters to spread farther apart,\n         * and a negative value bring characters closer together.\n         * @type { ?number } it is double type data\n         * @syscap SystemCapability.Graphics.Drawing\n         * @since 12\n         */\n        letterSpacing?: number;\n        /**\n         * Word spacing, in units of px. The value is a floating point number. The default value is 0.0.\n         * @type { ?number } it is double type data\n         * @syscap SystemCapability.Graphics.Drawing\n         * @since 12\n         */\n        wordSpacing?: number;\n        /**\n         * Scale factor of the line height. The value is a floating point number.\n         * The default value is 1.0. This parameter is valid only when heightOnly is set to true.\n         * @type { ?number } it is double type data\n         * @syscap SystemCapability.Graphics.Drawing\n         * @since 12\n         */\n        heightScale?: number;\n        /**\n         * Whether half leading is enabled.\n         * Half leading is the leading split in half and applied equally to the top and bottom edges.\n         * The value true means that half leading is enabled, and false means the opposite. The default value is false.\n         * @type { ?boolean } it is boolean type data\n         * @syscap SystemCapability.Graphics.Drawing\n         * @since 12\n         */\n        halfLeading?: boolean;\n        /**\n         * How the height of the text box is set.\n         * The value true means that the height of the text box is set based on the font size and the value of heightScale,\n         * and false means that the height is set based on the line height and line spacing. The default value is false.\n         * @type { ?boolean } it is boolean type data\n         * @syscap SystemCapability.Graphics.Drawing\n         * @since 12\n         */\n        heightOnly?: boolean;\n        /**\n         * Ellipsis content, which will be used to replace the extra content.\n         * @type { ?string } it is u16string type data.\n         * @syscap SystemCapability.Graphics.Drawing\n         * @since 12\n         */\n        ellipsis?: string;\n        /**\n         * Ellipsis type. The default value is END, indicating that the ellipsis is at the end of a line.\n         * @type { ?EllipsisMode } Ellipsis mode.\n         * @syscap SystemCapability.Graphics.Drawing\n         * @since 12\n         */\n        ellipsisMode?: EllipsisMode;\n        /**\n         * Locale. For example, 'en' indicates English, 'zh-Hans' indicates Simplified Chinese,\n         * and 'zh-Hant' indicates Traditional Chinese. For details, see ISO 639-1. The default value is an empty string.\n         * @type { ?string } it is string type data.\n         * @syscap SystemCapability.Graphics.Drawing\n         * @since 12\n         */\n        locale?: string;\n        /**\n         * Shift of the baseline. The value is a floating point number. The default value is 0.0px.\n         * @type { ?number } it is double type data.\n         * @syscap SystemCapability.Graphics.Drawing\n         * @since 12\n         */\n        baselineShift?: number;\n        /**\n         * Text Style available font features.\n         * @type { ?Array<FontFeature> } A collection of font features.\n         * @syscap SystemCapability.Graphics.Drawing\n         * @since 12\n         */\n        fontFeatures?: Array<FontFeature>;\n        /**\n         * Text shadows of text.\n         * @type { ?Array<TextShadow> } textShadow gather.\n         * @syscap SystemCapability.Graphics.Drawing\n         * @since 12\n         */\n        textShadows?: Array<TextShadow>;\n        /**\n         * Rectangle style of text.\n         * @type { ?RectStyle } rect style for text.\n         * @syscap SystemCapability.Graphics.Drawing\n         * @since 12\n         */\n        backgroundRect?: RectStyle;\n        /**\n         * Text Style available font variations.\n         * @type { ?Array<FontVariation> } A collection of font variations.\n         * @syscap SystemCapability.Graphics.Drawing\n         * @since 12\n         */\n        fontVariations?: Array<FontVariation>;\n        /**\n         * Text style available badge type.\n         * @type { ?TextBadgeType } The type of text badge type.\n         * @syscap SystemCapability.Graphics.Drawing\n         * @since 20\n         */\n        badgeType?: TextBadgeType;\n    }\n    /**\n     * Implements a collection of fonts.\n     * @syscap SystemCapability.Graphics.Drawing\n     * @since 12\n     */\n    class FontCollection {\n        /**\n         * Get global FontCollection instance of the application.\n         * @returns { FontCollection } The FontCollection object.\n         * @syscap SystemCapability.Graphics.Drawing\n         * @since 12\n         */\n        static getGlobalInstance(): FontCollection;\n        /**\n         * Loads a custom font. This API returns the result synchronously.\n         * In this API, name specifies the alias of the font, and the custom font effect can be displayed only when\n         * the value of name is set in fontFamilies in TextStyle. The supported font file formats are .ttf and .otf.\n         * @param { string } name - the font name.\n         * @param { string | Resource } path - Path of the font file to import. The value must be\n         * **file://**absolute path of the font file or **rawfile/**directory or file name.\n         * @syscap SystemCapability.Graphics.Drawing\n         * @since 12\n         */\n        loadFontSync(name: string, path: string | Resource): void;\n        /**\n         * Loads a custom font. This API uses a promise to return the result.\n         * In this API, name specifies the alias of the font, and the custom font effect can be displayed only when\n         * the value of name is set in fontFamilies in TextStyle. The supported font file formats are ttf and otf.\n         * @param { string } name - Name of the font. Any string is acceptable.\n         * @param { string | Resource } path - Path of the font file to load.\n         * The value must be **file://**absolute path of the font file or **rawfile/**directory or file name.\n         * @returns { Promise<void> } Promise that returns no value.\n         * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;\n         * <br>2. Incorrect parameter types; 3. Parameter verification failed.\n         * @syscap SystemCapability.Graphics.Drawing\n         * @since 18\n         */\n        loadFont(name: string, path: string | Resource): Promise<void>;\n        /**\n         * Clear font caches.\n         * The font cache has a memory limit and a clearing mechanism. It occupies limited memory.\n         * You are not advised to clear it unless otherwise required.\n         * @syscap SystemCapability.Graphics.Drawing\n         * @since 12\n         */\n        clearCaches(): void;\n    }\n    /**\n     * Describes the strut style, which determines the line spacing, baseline alignment mode,\n     * and other properties related to the line height when drawing texts. The strut style is disabled by default.\n     * @typedef StrutStyle\n     * @syscap SystemCapability.Graphics.Drawing\n     * @since 12\n     */\n    interface StrutStyle {\n        /**\n         * List of font families. By default, the list corresponds to the system's default fonts.\n         * @type { ?Array<string> } fontfamily gather\n         * @syscap SystemCapability.Graphics.Drawing\n         * @since 12\n         */\n        fontFamilies?: Array<string>;\n        /**\n         * Font style. The default value is NORMAL.\n         * @type { ?FontStyle } it is uint32_t type data\n         * @syscap SystemCapability.Graphics.Drawing\n         * @since 12\n         */\n        fontStyle?: FontStyle;\n        /**\n         * Font width. The default value is NORMAL.\n         * @type { ?FontWidth } it is uint32_t type data\n         * @syscap SystemCapability.Graphics.Drawing\n         * @since 12\n         */\n        fontWidth?: FontWidth;\n        /**\n         * Font weight. The default value is W400. The default system font supports font weight adjustment.\n         * For other fonts, if the weight is less than W600, there is no variation in stroke thickness.\n         * If the weight is greater than or equal to W600, it might result in a fake bold effect.\n         * @type { ?FontWeight } it is uint32_t type data\n         * @syscap SystemCapability.Graphics.Drawing\n         * @since 12\n         */\n        fontWeight?: FontWeight;\n        /**\n         * Font size, in units of px. The value is a floating point number. The default value is 14.0.\n         * @type { ?number } it is double type data\n         * @syscap SystemCapability.Graphics.Drawing\n         * @since 12\n         */\n        fontSize?: number;\n        /**\n         * Scale factor of the line height. The value is a floating point number. The default value is 1.0.\n         * @type { ?number } it is double type data\n         * @syscap SystemCapability.Graphics.Drawing\n         * @since 12\n         */\n        height?: number;\n        /**\n         * Custom leading to be applied to the strut. The value is a floating point number. The default value is -1.0.\n         * @type { ?number } it is double type data\n         * @syscap SystemCapability.Graphics.Drawing\n         * @since 12\n         */\n        leading?: number;\n        /**\n         * Whether to forcibly use the strut height for all lines. The value true means to forcibly use the strut height\n         * for all lines, and false means the opposite. The default value is false.\n         * @type { ?boolean } it is boolean type data\n         * @syscap SystemCapability.Graphics.Drawing\n         * @since 12\n         */\n        forceHeight?: boolean;\n        /**\n         * Whether to enable the strut style.\n         * The value true means to enable the strut style, and false means the opposite. The default value is false.\n         * @type { ?boolean } it is boolean type data\n         * @syscap SystemCapability.Graphics.Drawing\n         * @since 12\n         */\n        enabled?: boolean;\n        /**\n         * \tWhether to override the height. The value true means to override the height, and false means the opposite.\n         * The default value is false.\n         * @type { ?boolean } it is boolean type data\n         * @syscap SystemCapability.Graphics.Drawing\n         * @since 12\n         */\n        heightOverride?: boolean;\n        /**\n         * Whether half leading is enabled.\n         * Half leading is the leading split in half and applied equally to the top and bottom edges.\n         * The value true means that half leading is enabled, and false means the opposite. The default value is false.\n         * @type { ?boolean } it is boolean type data\n         * @syscap SystemCapability.Graphics.Drawing\n         * @since 12\n         */\n        halfLeading?: boolean;\n    }\n    /**\n     * Determines the configuration used by ParagraphBuilder to position lines within a Paragraph of text.\n     * @typedef ParagraphStyle\n     * @syscap SystemCapability.Graphics.Drawing\n     * @since 12\n     */\n    interface ParagraphStyle {\n        /**\n         * Text style applied to the paragraph. The default value is the initial text style.\n         * @type { ?TextStyle }\n         * @syscap SystemCapability.Graphics.Drawing\n         * @since 12\n         */\n        textStyle?: TextStyle;\n        /**\n         * Text direction. The default value is LTR.\n         * @type { ?TextDirection }\n         * @syscap SystemCapability.Graphics.Drawing\n         * @since 12\n         */\n        textDirection?: TextDirection;\n        /**\n         * Text alignment mode. The default value is START. This parameter is invalid when the tab parameter is configured.\n         * @type { ?TextAlign }\n         * @syscap SystemCapability.Graphics.Drawing\n         * @since 12\n         */\n        align?: TextAlign;\n        /**\n         * Word break type. The default value is BREAK_WORD.\n         * @type { ?WordBreak }\n         * @syscap SystemCapability.Graphics.Drawing\n         * @since 12\n         */\n        wordBreak?: WordBreak;\n        /**\n         * Maximum number of lines. The value is an integer. The default value is 1e9.\n         * @type { ?number }\n         * @syscap SystemCapability.Graphics.Drawing\n         * @since 12\n         */\n        maxLines?: number;\n        /**\n         * Text break strategy. The default value is GREEDY.\n         * @type { ?BreakStrategy }\n         * @syscap SystemCapability.Graphics.Drawing\n         * @since 12\n         */\n        breakStrategy?: BreakStrategy;\n        /**\n         * Strut style. The default value is the initial StrutStyle object.\n         * @type { ?StrutStyle }\n         * @syscap SystemCapability.Graphics.Drawing\n         * @since 12\n         */\n        strutStyle?: StrutStyle;\n        /**\n         * Text height modifier pattern. The default value is ALL.\n         * @type { ?TextHeightBehavior }\n         * @syscap SystemCapability.Graphics.Drawing\n         * @since 12\n         */\n        textHeightBehavior?: TextHeightBehavior;\n        /**\n         * Alignment mode and position of the text after the tab character in a paragraph. By default, the tab character\n         * is replaced with a space. This parameter is invalid when it is used together with the align parameter or\n         * the ellipsis parameter in TextStyle.\n         * @type { ?TextTab }\n         * @syscap SystemCapability.Graphics.Drawing\n         * @since 18\n         */\n        tab?: TextTab;\n        /**\n         * Whether to optimize white spaces at the end of each line.\n         * @type { ?boolean } Boolean type data.\n         * @syscap SystemCapability.Graphics.Drawing\n         * @since 20\n         */\n        trailingSpaceOptimized?: boolean;\n        /**\n         * Whether to enable automatic spacing between Chinese and English for paragraph.\n         * @type { ?boolean }\n         * @syscap SystemCapability.Graphics.Drawing\n         * @since 20\n         */\n        autoSpace?: boolean;\n    }\n    /**\n     * Enumerates the vertical alignment modes of a placeholder relative to the surrounding text.\n     * @enum { number }\n     * @syscap SystemCapability.Graphics.Drawing\n     * @since 12\n     */\n    enum PlaceholderAlignment {\n        /**\n         * Aligns the baseline of the placeholder to the baseline of the text.\n         * @syscap SystemCapability.Graphics.Drawing\n         * @since 12\n         */\n        OFFSET_AT_BASELINE,\n        /**\n         * Aligns the bottom edge of the placeholder to the baseline of the text.\n         * sits on top of the baseline.\n         * @syscap SystemCapability.Graphics.Drawing\n         * @since 12\n         */\n        ABOVE_BASELINE,\n        /**\n         * Aligns the top edge of the placeholder to the baseline of the text.\n         * hangs below the baseline.\n         * @syscap SystemCapability.Graphics.Drawing\n         * @since 12\n         */\n        BELOW_BASELINE,\n        /**\n         * Align the top edge of the placeholder with the top edge of the font. When the placeholder is very tall,\n         * the extra space will hang from the top and extend through the bottom of the line.\n         * @syscap SystemCapability.Graphics.Drawing\n         * @since 12\n         */\n        TOP_OF_ROW_BOX,\n        /**\n         * Align the bottom edge of the placeholder with the bottom edge of the text. When the placeholder is very tall,\n         * the extra space will rise from the bottom and extend through the top of the line.\n         * @syscap SystemCapability.Graphics.Drawing\n         * @since 12\n         */\n        BOTTOM_OF_ROW_BOX,\n        /**\n         * Align the middle of the placeholder with the middle of the text. When the placeholder is very tall,\n         * the extra space will grow equally from the top and bottom of the line.\n         * @syscap SystemCapability.Graphics.Drawing\n         * @since 12\n         */\n        CENTER_OF_ROW_BOX\n    }\n    /**\n     * Describes the placeholder style.\n     * @typedef PlaceholderSpan\n     * @syscap SystemCapability.Graphics.Drawing\n     * @since 12\n     */\n    interface PlaceholderSpan {\n        /**\n         * Width of the placeholder, in units of px. The value is a floating point number.\n         * @type { number }\n         * @syscap SystemCapability.Graphics.Drawing\n         * @since 12\n         */\n        width: number;\n        /**\n         * Height of the placeholder, in units of px. The value is a floating point number.\n         * @type { number }\n         * @syscap SystemCapability.Graphics.Drawing\n         * @since 12\n         */\n        height: number;\n        /**\n         * Vertical alignment of the placeholder relative to the surrounding text.\n         * @type { PlaceholderAlignment }\n         * @syscap SystemCapability.Graphics.Drawing\n         * @since 12\n         */\n        align: PlaceholderAlignment;\n        /**\n         * Type of the text baseline.\n         * @type { TextBaseline }\n         * @syscap SystemCapability.Graphics.Drawing\n         * @since 12\n         */\n        baseline: TextBaseline;\n        /**\n         * Offset to the text baseline, in units of px. The value is a floating point number.\n         * @type { number }\n         * @syscap SystemCapability.Graphics.Drawing\n         * @since 12\n         */\n        baselineOffset: number;\n    }\n    /**\n     * Describes a left-closed and right-open interval.\n     * @typedef Range\n     * @syscap SystemCapability.Graphics.Drawing\n     * @since 12\n     */\n    interface Range {\n        /**\n         * Index of the leftmost point of the interval. The value is an integer.\n         * @type { number }\n         * @syscap SystemCapability.Graphics.Drawing\n         * @since 12\n         */\n        start: number;\n        /**\n         * Index of the rightmost point of the interval. The value is an integer.\n         * @type { number }\n         * @syscap SystemCapability.Graphics.Drawing\n         * @since 12\n         */\n        end: number;\n    }\n    /**\n     * Enumerates the font types, which can be combined through bitwise OR operations.\n     * @enum { number }\n     * @syscap SystemCapability.Graphics.Drawing\n     * @since 14\n     */\n    enum SystemFontType {\n        /**\n         * All font types, including the system font type, style font type, and user-installed font type.\n         * @syscap SystemCapability.Graphics.Drawing\n         * @since 14\n         */\n        ALL = 1 << 0,\n        /**\n         * System generic font type.\n         * @syscap SystemCapability.Graphics.Drawing\n         * @since 14\n         */\n        GENERIC = 1 << 1,\n        /**\n         * Style font type. The style font type is designed for 2-in-1 devices.\n         * @syscap SystemCapability.Graphics.Drawing\n         * @since 14\n         */\n        STYLISH = 1 << 2,\n        /**\n         * Font type that has been installed.\n         * @syscap SystemCapability.Graphics.Drawing\n         * @since 14\n         */\n        INSTALLED = 1 << 3,\n        /**\n         * Customized font types.\n         * @syscap SystemCapability.Graphics.Drawing\n         * @since 18\n         */\n        CUSTOMIZED = 1 << 4\n    }\n    /**\n     * Describes the font descriptor information.\n     * @typedef FontDescriptor\n     * @syscap SystemCapability.Graphics.Drawing\n     * @since 14\n     */\n    interface FontDescriptor {\n        /**\n         * Absolute path of the font. Any string is acceptable, but the value must adhere to the system's path constraints.\n         * The default value is an empty string.\n         * @type { ?string }\n         * @syscap SystemCapability.Graphics.Drawing\n         * @since 14\n         */\n        path?: string;\n        /**\n         * Unique name of the font. Any string is acceptable. The default value is an empty string.\n         * @type { ?string }\n         * @syscap SystemCapability.Graphics.Drawing\n         * @since 14\n         */\n        postScriptName?: string;\n        /**\n         * Font name. Any string is acceptable. The default value is an empty string.\n         * @type { ?string }\n         * @syscap SystemCapability.Graphics.Drawing\n         * @since 14\n         */\n        fullName?: string;\n        /**\n         * Family name of the font. Any string is acceptable. The default value is an empty string.\n         * @type { ?string }\n         * @syscap SystemCapability.Graphics.Drawing\n         * @since 14\n         */\n        fontFamily?: string;\n        /**\n         * Subfamily name of the font. Any string is acceptable. The default value is an empty string.\n         * @type { ?string }\n         * @syscap SystemCapability.Graphics.Drawing\n         * @since 14\n         */\n        fontSubfamily?: string;\n        /**\n         * Font weight. The default value is 0.\n         * @type { ?FontWeight }\n         * @syscap SystemCapability.Graphics.Drawing\n         * @since 14\n         */\n        weight?: FontWeight;\n        /**\n         * Font width. The value is an integer ranging from 1 to 9. The default value is 0.\n         * @type { ?number }\n         * @syscap SystemCapability.Graphics.Drawing\n         * @since 14\n         */\n        width?: number;\n        /**\n         * Whether the font is italic. The value 0 means that the font is not italic, and 1 means the opposite.\n         * The default value is 0.\n         * @type { ?number }\n         * @syscap SystemCapability.Graphics.Drawing\n         * @since 14\n         */\n        italic?: number;\n        /**\n         * Whether the font is monospaced. The value true means that the font is monospaced, and false means the opposite.\n         * The default value is false.\n         * @type { ?boolean }\n         * @syscap SystemCapability.Graphics.Drawing\n         * @since 14\n         */\n        monoSpace?: boolean;\n        /**\n         * Whether the font is symbolic. The value true means that the font is symbolic, and false means the opposite.\n         * @type { ?boolean }\n         * @syscap SystemCapability.Graphics.Drawing\n         * @since 14\n         */\n        symbolic?: boolean;\n    }\n    /**\n     * Implements a carrier that stores the text content and style. You can perform operations such as layout and drawing.\n     * Before calling any of the following APIs, you must use build() of the ParagraphBuilder class to\n     * create a Paragraph object.\n     * @syscap SystemCapability.Graphics.Drawing\n     * @since 12\n     */\n    class Paragraph {\n        /**\n         * Performs layout and calculates the positions of all glyphs.\n         * @param { number } width - Maximum width of a single line, in units of px. The value is a floating point number.\n         * @syscap SystemCapability.Graphics.Drawing\n         * @since 12\n         */\n        layoutSync(width: number): void;\n        /**\n         * Performs layout and calculates the positions of all glyphs. This API uses a promise to return the result.\n         * @param { number } width - Maximum width of a single line, in units of px. The value is a floating point number.\n         * @returns { Promise<void> } Promise that returns no value.\n         * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;\n         * <br>2. Incorrect parameter types; 3. Parameter verification failed.\n         * @syscap SystemCapability.Graphics.Drawing\n         * @since 18\n         */\n        layout(width: number): Promise<void>;\n        /**\n         * Paints the text on the canvas with the coordinate point (x, y) as the upper left corner.\n         * @param { drawing.Canvas } canvas - Target canvas.\n         * @param { number } x - X coordinate of the upper left corner. The value is a floating point number.\n         * @param { number } y - Y coordinate of the upper left corner. The value is a floating point number.\n         * @syscap SystemCapability.Graphics.Drawing\n         * @since 12\n         */\n        paint(canvas: drawing.Canvas, x: number, y: number): void;\n        /**\n         * Draw the laid out text onto the supplied canvas along the path and offset.\n         * @param { drawing.Canvas } canvas - Canvas used to carry the drawn content and drawing status.\n         * @param { drawing.Path } path - Path used to determine the position of the text.\n         * @param { number } hOffset - Horizontal offset along the path direction. A positive number indicates a position\n         * that is ahead along the path from its start point, and a negative number indicates a position that is behind\n         * from the start point.\n         * @param { number } vOffset - Vertical offset along the path direction. A positive number indicates a position\n         * on the left side of the path, and a negative number indicates a position on the right side of the path.\n         * @syscap SystemCapability.Graphics.Drawing\n         * @since 12\n         */\n        paintOnPath(canvas: drawing.Canvas, path: drawing.Path, hOffset: number, vOffset: number): void;\n        /**\n         * Obtains the maximum width of the line in the text.\n         * @returns { number } Maximum line width, in units of px. The value is a floating point number.\n         * @syscap SystemCapability.Graphics.Drawing\n         * @since 12\n         */\n        getMaxWidth(): number;\n        /**\n         * Obtains the total height of the text.\n         * @returns { number } Total height, in units of px. The value is a floating point number.\n         * @syscap SystemCapability.Graphics.Drawing\n         * @since 12\n         */\n        getHeight(): number;\n        /**\n         * Obtains the longest line in the text.\n         * @returns { number } Longest line, in units of px. The value is a floating point number.\n         * @syscap SystemCapability.Graphics.Drawing\n         * @since 12\n         */\n        getLongestLine(): number;\n        /**\n         * Obtains the width of the longest line, including its indentation, in the text.\n         * You are advised to round up the return value. If the text content is empty, 0 is returned.\n         * @returns { number } Width of the longest line, including its indentation.\n         * The value is a floating point number, in px.\n         * @syscap SystemCapability.Graphics.Drawing\n         * @since 13\n         */\n        getLongestLineWithIndent(): number;\n        /**\n         * Obtains the minimum intrinsic width of the paragraph.\n         * @returns { number } Minimum intrinsic width, in units of px. The value is a floating point number.\n         * @syscap SystemCapability.Graphics.Drawing\n         * @since 12\n         */\n        getMinIntrinsicWidth(): number;\n        /**\n         * Obtains the maximum intrinsic width of the paragraph.\n         * @returns { number } Maximum intrinsic width, in units of px. The value is a floating point number.\n         * @syscap SystemCapability.Graphics.Drawing\n         * @since 12\n         */\n        getMaxIntrinsicWidth(): number;\n        /**\n         * Obtains the alphabetic baseline.\n         * @returns { number } Alphabetic baseline, in units of px. The value is a floating point number.\n         * @syscap SystemCapability.Graphics.Drawing\n         * @since 12\n         */\n        getAlphabeticBaseline(): number;\n        /**\n         * Obtains the ideographic baseline.\n         * @returns { number } Ideographic baseline, in units of px. The value is a floating point number.\n         * @syscap SystemCapability.Graphics.Drawing\n         * @since 12\n         */\n        getIdeographicBaseline(): number;\n        /**\n         * Obtains the rectangles occupied by the characters in the range of the text under the given rectangle width and\n         * height.\n         * @param { Range } range - Range of the text.\n         * @param { RectWidthStyle } widthStyle - Width of the rectangle.\n         * @param { RectHeightStyle } heightStyle - Height of the rectangle.\n         * @returns { Array<TextBox> } Array holding the rectangles obtained.\n         * @syscap SystemCapability.Graphics.Drawing\n         * @since 12\n         */\n        getRectsForRange(range: Range, widthStyle: RectWidthStyle, heightStyle: RectHeightStyle): Array<TextBox>;\n        /**\n         * Obtains the rectangles occupied by all placeholders in the text.\n         * @returns { Array<TextBox> } Array holding the rectangles obtained.\n         * @syscap SystemCapability.Graphics.Drawing\n         * @since 12\n         */\n        getRectsForPlaceholders(): Array<TextBox>;\n        /**\n         * Obtains the position of a glyph closest to the given coordinates.\n         * @param { number } x - X coordinate. The value is a floating point number.\n         * @param { number } y - Y coordinate. The value is a floating point number.\n         * @returns { PositionWithAffinity } Position of the glyph.\n         * @syscap SystemCapability.Graphics.Drawing\n         * @since 12\n         */\n        getGlyphPositionAtCoordinate(x: number, y: number): PositionWithAffinity;\n        /**\n         * Obtains the range of the word where the glyph with a given offset is located.\n         * @param { number } offset - Offset of the glyph. The value is an integer.\n         * @returns { Range } Range of the word.\n         * @syscap SystemCapability.Graphics.Drawing\n         * @since 12\n         */\n        getWordBoundary(offset: number): Range;\n        /**\n         * Obtains the number of text lines.\n         * @returns { number } Number of text lines. The value is an integer.\n         * @syscap SystemCapability.Graphics.Drawing\n         * @since 12\n         */\n        getLineCount(): number;\n        /**\n         * Obtains the height of a given line.\n         * @param { number } line - Index of the line. The value is an integer ranging from 0 to getLineCount() – 1.\n         * @returns { number } The line height value returned to the caller.\n         * @syscap SystemCapability.Graphics.Drawing\n         * @since 12\n         */\n        getLineHeight(line: number): number;\n        /**\n         * Obtains the width of a given line.\n         * @param { number } line - Index of the line. The value is an integer ranging from 0 to getLineCount() – 1.\n         * @returns { number } The line width value returned to the caller.\n         * @syscap SystemCapability.Graphics.Drawing\n         * @since 12\n         */\n        getLineWidth(line: number): number;\n        /**\n         * Checks whether the number of lines in the paragraph exceeds the maximum.\n         * @returns { boolean } Check result. The value true means that the number of lines exceeds the maximum,\n         * and false means the opposite.\n         * @syscap SystemCapability.Graphics.Drawing\n         * @since 12\n         */\n        didExceedMaxLines(): boolean;\n        /**\n         * Obtains all the text lines.\n         * @returns { Array<TextLine> } Array of text lines.\n         * @syscap SystemCapability.Graphics.Drawing\n         * @since 12\n         */\n        getTextLines(): Array<TextLine>;\n        /**\n         * Obtains the actually visible text range in the specified line, excluding any overflow ellipsis.\n         * @param { number } lineNumber - Line number of the text range, starting from 0. This API can only be used to\n         * obtain the bounds of existing lines. That is, the line number must start from 0, and the maximum line number\n         * is getLineCount - 1.\n         * @param { boolean } includeSpaces - Whether spaces are included. The value true means that spaces are contained,\n         * and false means the opposite.\n         * @returns { Range } Text range obtained. If the line index is invalid, start and end are both 0.\n         * @syscap SystemCapability.Graphics.Drawing\n         * @since 12\n         */\n        getActualTextRange(lineNumber: number, includeSpaces: boolean): Range;\n        /**\n         * Obtains an array of line measurement information.\n         * @returns { Array<LineMetrics> } Array of line measurement information.\n         * @syscap SystemCapability.Graphics.Drawing\n         * @since 12\n         */\n        getLineMetrics(): Array<LineMetrics>;\n        /**\n         * Obtains the line measurement information of a line.\n         * @param { number } lineNumber - Line number, starting from 0.\n         * @returns { LineMetrics | undefined } LineMetrics object containing the measurement information if the specified\n         * line number is valid and the measurement information exists. If the line number is invalid or\n         * the measurement information cannot be obtained, undefined is returned.\n         * @syscap SystemCapability.Graphics.Drawing\n         * @since 12\n         */\n        getLineMetrics(lineNumber: number): LineMetrics | undefined;\n        /**\n         * Synchronously updates the text color of the typography.\n         * @param { common2D.Color } color - Color of text.\n         * @syscap SystemCapability.Graphics.Drawing\n         * @since 20\n         */\n        updateColor(color: common2D.Color): void;\n        /**\n         * Synchronously updates text decoration.\n         * @param { Decoration } decoration - Decoration of text.\n         * @syscap SystemCapability.Graphics.Drawing\n         * @since 20\n         */\n        updateDecoration(decoration: Decoration): void;\n    }\n    /**\n     * Implements a carrier that stores the text content and style. It can be used to compute layout details for\n     * individual lines of text. Before calling any of the following APIs, you must use buildLineTypeset()\n     * in the ParagraphBuilder class to create a LineTypeset object.\n     * @syscap SystemCapability.Graphics.Drawing\n     * @since 18\n     */\n    class LineTypeset {\n        /**\n         * Obtains the number of characters that can fit in the layout from the specified position within a limited width.\n         * @param { number } startIndex - Start position (inclusive) for calculation. The value is an integer in the range\n         * [0, total number of text characters). If the parameter is invalid, an exception is thrown.\n         * @param { number } width - Layout width. The value is a floating point number greater than 0, in px.\n         * @returns { number } Number of characters.\n         * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;\n         * <br>2. Incorrect parameter types; 3. Parameter verification failed.\n         * @syscap SystemCapability.Graphics.Drawing\n         * @since 18\n         */\n        getLineBreak(startIndex: number, width: number): number;\n        /**\n         * Generates a text line object based on the specified layout range.\n         * @param { number } startIndex - Start position for layout calculation. The value is an integer in the\n         * range [0, total number of text characters).\n         * @param { number } count - \tNumber of characters from the specified start position. The value is an integer in\n         * the range [0, total number of text characters). The sum of startIndex and count cannot be greater than\n         * the total number of text characters. When count is 0, the range is [startIndex, end of the text].\n         * You can use getLineBreak to obtain the number of characters that can fit in the layout.\n         * @returns { TextLine } TextLine object generated based on the characters in the text range.\n         * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;\n         * <br>2. Incorrect parameter types; 3. Parameter verification failed.\n         * @syscap SystemCapability.Graphics.Drawing\n         * @since 18\n         */\n        createLine(startIndex: number, count: number): TextLine;\n    }\n    /**\n     * Describes the rectangle that holds the text.\n     * @typedef TextBox\n     * @syscap SystemCapability.Graphics.Drawing\n     * @since 12\n     */\n    interface TextBox {\n        /**\n         * Information about the rectangle.\n         * @type { common2D.Rect }\n         * @syscap SystemCapability.Graphics.Drawing\n         * @since 12\n         */\n        rect: common2D.Rect;\n        /**\n         * Text direction.\n         * @type { TextDirection }\n         * @syscap SystemCapability.Graphics.Drawing\n         * @since 12\n         */\n        direction: TextDirection;\n    }\n    /**\n     * Describes the position and affinity of a glyph.\n     * @typedef PositionWithAffinity\n     * @syscap SystemCapability.Graphics.Drawing\n     * @since 12\n     */\n    interface PositionWithAffinity {\n        /**\n         * Index of the glyph relative to the paragraph. The value is an integer.\n         * @type { number }\n         * @syscap SystemCapability.Graphics.Drawing\n         * @since 12\n         */\n        position: number;\n        /**\n         * Affinity of the position.\n         * @type { Affinity }\n         * @syscap SystemCapability.Graphics.Drawing\n         * @since 12\n         */\n        affinity: Affinity;\n    }\n    /**\n     * Enumerates the rectangle width styles.\n     * @enum { number }\n     * @syscap SystemCapability.Graphics.Drawing\n     * @since 12\n     */\n    enum RectWidthStyle {\n        /**\n         * If letterSpacing is not set, the rectangle conforms tightly to the text it contains.\n         * However, if letterSpacing is set, a gap is introduced between the rectangle and text.\n         * @syscap SystemCapability.Graphics.Drawing\n         * @since 12\n         */\n        TIGHT,\n        /**\n         * The rectangle's width is extended to align with the widest rectangle across all lines.\n         * @syscap SystemCapability.Graphics.Drawing\n         * @since 12\n         */\n        MAX\n    }\n    /**\n     * Enumerates the rectangle height styles.\n     * @enum { number }\n     * @syscap SystemCapability.Graphics.Drawing\n     * @since 12\n     */\n    enum RectHeightStyle {\n        /**\n         * Tight style.\n         * @syscap SystemCapability.Graphics.Drawing\n         * @since 12\n         */\n        TIGHT,\n        /**\n         * Extends the height to match the highest rectangle in all lines.\n         * @syscap SystemCapability.Graphics.Drawing\n         * @since 12\n         */\n        MAX,\n        /**\n         * The top and bottom of each rect will cover half of the space above and half of the space below the line.\n         * @syscap SystemCapability.Graphics.Drawing\n         * @since 12\n         */\n        INCLUDE_LINE_SPACE_MIDDLE,\n        /**\n         * The line spacing will be added to the top of the rect.\n         * @syscap SystemCapability.Graphics.Drawing\n         * @since 12\n         */\n        INCLUDE_LINE_SPACE_TOP,\n        /**\n         * The line spacing will be added to the bottom of the rect.\n         * @syscap SystemCapability.Graphics.Drawing\n         * @since 12\n         */\n        INCLUDE_LINE_SPACE_BOTTOM,\n        /**\n         * The height of the boxes will be calculated by text strut.\n         * @syscap SystemCapability.Graphics.Drawing\n         * @since 12\n         */\n        STRUT\n    }\n    /**\n     * Enumerates text affinity.When a selection range involves line breaks or other special characters, the\n     * affinity determines which side of the characters the start and end of the selection range should be\n     * closer to.\n     * @enum { number }\n     * @syscap SystemCapability.Graphics.Drawing\n     * @since 12\n     */\n    enum Affinity {\n        /**\n         * The position has affinity for the upstream side of the text position.\n         * @syscap SystemCapability.Graphics.Drawing\n         * @since 12\n         */\n        UPSTREAM,\n        /**\n         * The position has affinity for the downstream side of the text position.\n         * @syscap SystemCapability.Graphics.Drawing\n         * @since 12\n         */\n        DOWNSTREAM\n    }\n    /**\n     * Builds a Paragraph containing text with the given styling information.\n     * @syscap SystemCapability.Graphics.Drawing\n     * @since 12\n     */\n    class ParagraphBuilder {\n        /**\n         * A constructor used to create a ParagraphBuilder object.\n         * @param { ParagraphStyle } paragraphStyle - Paragraph style {@link ParagraphStyle}\n         * @param { FontCollection } fontCollection - Font collection {@link FontCollection}\n         * @syscap SystemCapability.Graphics.Drawing\n         * @since 12\n         */\n        constructor(paragraphStyle: ParagraphStyle, fontCollection: FontCollection);\n        /**\n         * Applies a new style to the current text blob.\n         * <p>**NOTE**</p>\n         * When you update the style of the current text blob, all text added afterward will use this new style.\n         * @param { TextStyle } textStyle - Text style, which describes various visual attributes of text, such as font,\n         * font size, color, font weight, word spacing, line spacing, decoration (such as underline and strikethrough),\n         * and text shadow. {@link TextStyle}\n         * @syscap SystemCapability.Graphics.Drawing\n         * @since 12\n         */\n        pushStyle(textStyle: TextStyle): void;\n        /**\n         * Restores the previous text style.\n         * @syscap SystemCapability.Graphics.Drawing\n         * @since 12\n         */\n        popStyle(): void;\n        /**\n         * Inserts a text string into the paragraph being built.\n         * @param { string } text - Exact text string inserted into the paragraph. If an invalid Unicode character is\n         * provided, it is displayed as �.\n         * @syscap SystemCapability.Graphics.Drawing\n         * @since 12\n         */\n        addText(text: string): void;\n        /**\n         * Inserts a placeholder into the paragraph being built.\n         * @param { PlaceholderSpan } placeholderSpan - Placeholder span, which describes the size, alignment,\n         * baseline type, and baseline offset of the placeholder. {@link PlaceholderSpan}\n         * @syscap SystemCapability.Graphics.Drawing\n         * @since 12\n         */\n        addPlaceholder(placeholderSpan: PlaceholderSpan): void;\n        /**\n         * Creates a paragraph object that can be used for subsequent layout and rendering.\n         * @returns { Paragraph } Paragraph object that can be used for subsequent rendering.\n         * @syscap SystemCapability.Graphics.Drawing\n         * @since 12\n         */\n        build(): Paragraph;\n        /**\n         * Builds a line typesetter.\n         * @returns { LineTypeset } LineTypeset object that can be used for subsequent rendering.\n         * @syscap SystemCapability.Graphics.Drawing\n         * @since 18\n         */\n        buildLineTypeset(): LineTypeset;\n        /**\n         * Inserts a symbol into the paragraph being built.\n         * @param { number } symbolId - Symbol code to insert. The value is a hexadecimal number in the\n         * range 0xF0000-0xF0C97. For details about the configurable symbol codes (unicode values in the list view),\n         * see <a href=\"https://developer.huawei.com/consumer/cn/design/harmonyos-symbol/\">HarmonyOS Symbol</a>.\n         * @syscap SystemCapability.Graphics.Drawing\n         * @since 12\n         */\n        addSymbol(symbolId: number): void;\n    }\n    /**\n     * Describes the typographic boundaries of a text line. These boundaries depend on the typographic font and font size,\n     * not on the characters themselves. For example, for the string \" a b \" (which has a space before \"a\" and a space\n     * after \"b\"), the typographic boundaries include the spaces at the beginning and end of the line. Similarly,\n     * the strings \"j\" and \"E\" have identical typographic boundaries, which are independent of the characters themselves.\n     * @typedef TypographicBounds\n     * @syscap SystemCapability.Graphics.Drawing\n     * @since 18\n     */\n    interface TypographicBounds {\n        /**\n         * Ascent of a text line. The value is a floating point number.\n         * @type { number }\n         * @syscap SystemCapability.Graphics.Drawing\n         * @since 18\n         */\n        ascent: number;\n        /**\n         * Descent of a text line. The value is a floating point number.\n         * @type { number }\n         * @syscap SystemCapability.Graphics.Drawing\n         * @since 18\n         */\n        descent: number;\n        /**\n         * Leading of a text line. The value is a floating point number.\n         * @type { number }\n         * @syscap SystemCapability.Graphics.Drawing\n         * @since 18\n         */\n        leading: number;\n        /**\n         * Width of the typographic boundaries. The value is a floating point number.\n         * @type { number }\n         * @syscap SystemCapability.Graphics.Drawing\n         * @since 18\n         */\n        width: number;\n    }\n    /**\n     * Defines the callback used to receive the offset and index of each character in a text line object\n     * as its parameters.\n     *\n     * @typedef { function } CaretOffsetsCallback\n     * @param { number } offset - Offset of each character in a text line. The value is a floating point number.\n     * @param { number } index - Index of each character in a text line. The value is an integer.\n     * @param { boolean } leadingEdge - Whether the cursor is located at the front of the character. The value true means\n     * that the cursor is located at the front of the character, that is, the offset does not contain the character\n     * width. The value false means that the cursor is located at the rear of the character, that is, the offset\n     * contains the character width.\n     * callback function.\n     * @returns { boolean } Whether to stop calling the callback. The value true means to stop calling the callback,\n     * and false means to continue calling the callback.\n     * @syscap SystemCapability.Graphics.Drawing\n     * @since 18\n     */\n    type CaretOffsetsCallback = (offset: number, index: number, leadingEdge: boolean) => boolean;\n    /**\n     * Implements a carrier that describes the basic text line structure of a paragraph.\n     * Before calling any of the following APIs, you must use getTextLines() of the Paragraph class or createLine() of\n     * the LineTypeset class to create a TextLine object.\n     * @syscap SystemCapability.Graphics.Drawing\n     * @since 12\n     */\n    class TextLine {\n        /**\n         * Obtains the number of glyphs in this text line.\n         * @returns { number } Number of glyphs. The value is an integer.\n         * @syscap SystemCapability.Graphics.Drawing\n         * @since 12\n         */\n        getGlyphCount(): number;\n        /**\n         * Obtains the range of the text in this text line in the entire paragraph.\n         * @returns { Range } Range of the text in this text line in the entire paragraph.\n         * @syscap SystemCapability.Graphics.Drawing\n         * @since 12\n         */\n        getTextRange(): Range;\n        /**\n         * Obtains the array of glyph runs in the text line.\n         * @returns { Array<Run> } Array of the runs obtained.\n         * @syscap SystemCapability.Graphics.Drawing\n         * @since 12\n         */\n        getGlyphRuns(): Array<Run>;\n        /**\n         * Paints this text line on the canvas with the coordinate point (x, y) as the upper left corner.\n         * @param { drawing.Canvas } canvas - Target canvas.\n         * @param { number } x - X coordinate of the upper left corner. The value is a floating point number.\n         * @param { number } y - Y coordinate of the upper left corner. The value is a floating point number.\n         * @syscap SystemCapability.Graphics.Drawing\n         * @since 12\n         */\n        paint(canvas: drawing.Canvas, x: number, y: number): void;\n        /**\n         * Creates a truncated text line object.\n         * @param { number } width - Width of the line after truncation. The value is a floating point number.\n         * @param { EllipsisMode } ellipsisMode - Ellipsis mode. Currently, only START and END are supported.\n         * @param { string } ellipsis - String used to mark a truncation.\n         * @returns { TextLine } Truncated text line object.\n         * @syscap SystemCapability.Graphics.Drawing\n         * @since 18\n         */\n        createTruncatedLine(width: number, ellipsisMode: EllipsisMode, ellipsis: string): TextLine;\n        /**\n         * Obtains the typographic boundaries of this text line. These boundaries depend on the typographic font and font\n         * size, but not on the characters themselves. For example, for the string \" a b \" (which has a space before\n         * \"a\" and a space after \"b\"), the typographic boundaries include the spaces at the beginning and end of the\n         * line. Similarly, the strings \"j\" and \"E\" have identical typographic boundaries, which are independent of\n         * the characters themselves.\n         * @returns { TypographicBounds } Typographic boundaries of the text line.\n         * @syscap SystemCapability.Graphics.Drawing\n         * @since 18\n         */\n        getTypographicBounds(): TypographicBounds;\n        /**\n         * Obtains the image boundaries of this text line. The image boundaries, equivalent to visual boundaries, depend on\n         * the font, font size, and characters. For example, for the string \" a b \" (which has a space before \"a\" and\n         * a space after \"b\"), only \"a b\" are visible to users, and therefore the image boundaries do not include these\n         * spaces at the beginning and end of the line. For the strings \"j\" and \"E\", their image boundaries are\n         * different. Specifically, the width of the boundary for \"j\" is narrower than that for \"E\", and the height of\n         * the boundary for \"j\" is taller than that for \"E\".\n         * @returns { common2D.Rect } Image boundary of the text line.\n         * @syscap SystemCapability.Graphics.Drawing\n         * @since 18\n         */\n        getImageBounds(): common2D.Rect;\n        /**\n         * Obtains the width of the spaces at the end of this text line.\n         * @returns { number } Number of spaces at the end of the text line. The value is a floating point number.\n         * @syscap SystemCapability.Graphics.Drawing\n         * @since 18\n         */\n        getTrailingSpaceWidth(): number;\n        /**\n         * Obtains the index of a character at the specified position in the original string.\n         * @param { common2D.Point } point - Position of the character.\n         * @returns { number } Index of the character in the text line. The value is an integer.\n         * @syscap SystemCapability.Graphics.Drawing\n         * @since 18\n         */\n        getStringIndexForPosition(point: common2D.Point): number;\n        /**\n         * Obtains the offset of a character with the specified index in this text line.\n         * @param { number } index - Index of the character. The value is an integer.\n         * @returns { number } Offset of the character with the specified index. The value is a floating point number.\n         * @syscap SystemCapability.Graphics.Drawing\n         * @since 18\n         */\n        getOffsetForStringIndex(index: number): number;\n        /**\n         * Enumerates the offset and index of each character in a text line.\n         * @param { CaretOffsetsCallback } callback - Custom function, which contains the offset and index of each\n         * character in the text line.\n         * @syscap SystemCapability.Graphics.Drawing\n         * @since 18\n         */\n        enumerateCaretOffsets(callback: CaretOffsetsCallback): void;\n        /**\n         * Obtains the offset of this text line after alignment based on the alignment factor and alignment width.\n         * @param { number } alignmentFactor - Alignment factor, which determines how text is aligned. The value is a\n         * floating point number. A value less than or equal to 0.0 means that the text is left-aligned; a value\n         * between 0.0 and 0.5 means that the text is slightly left-aligned; the value 0.5 means that is text\n         * is centered; a value between 0.5 and 1 means that the text is slightly right-aligned; a value greater than\n         * or equal to 1.0 means that the text is right-aligned.\n         * @param { number } alignmentWidth - Alignment width, that is, the width of the text line. The value is a floating\n         * point number. If the width is less than the actual width of the text line, 0 is returned.\n         * @returns { number } Offset required for alignment. The value is a floating point number.\n         * @syscap SystemCapability.Graphics.Drawing\n         * @since 18\n         */\n        getAlignmentOffset(alignmentFactor: number, alignmentWidth: number): number;\n    }\n    /**\n     * Implements a unit for text layout.\n     * Before calling any of the following APIs, you must use getGlyphRuns() of the TextLine class to create a Run object.\n     * @syscap SystemCapability.Graphics.Drawing\n     * @since 12\n     */\n    class Run {\n        /**\n         * Obtains the number of glyphs in this run.\n         * @returns { number } Number of glyphs. The value is an integer.\n         * @syscap SystemCapability.Graphics.Drawing\n         * @since 12\n         */\n        getGlyphCount(): number;\n        /**\n         * Obtains the index of each glyph in this run.\n         * @returns { Array<number> } Array holding the index of each glyph in the run.\n         * @syscap SystemCapability.Graphics.Drawing\n         * @since 12\n         */\n        getGlyphs(): Array<number>;\n        /**\n         * Obtains the index of each glyph in the specified range of this run.\n         * @param { Range } range - Range of the glyphs, where range.start indicates the start position of the range, and\n         * range. end indicates the length of the range. If the length is 0, the range is from range.start to the end\n         * of the run. If range.end or range.start is set to a negative value, null, or undefined, undefined is\n         * returned.\n         * @returns { Array<number> } Array holding the index of each glyph in the run.\n         * @syscap SystemCapability.Graphics.Drawing\n         * @since 18\n         */\n        getGlyphs(range: Range): Array<number>;\n        /**\n         * Obtains the position of each glyph relative to the respective line in this run.\n         * @returns { Array<common2D.Point> } Array holding the position of each glyph relative to the respective line in\n         * the run.\n         * @syscap SystemCapability.Graphics.Drawing\n         * @since 12\n         */\n        getPositions(): Array<common2D.Point>;\n        /**\n         * Obtains the position array of each glyph relative to the respective line within the specified range of this run.\n         * @param { Range } range - Range of the glyphs, where range.start indicates the start position of the range, and\n         * range. end indicates the length of the range. If the length is 0, the range is from range.start to the end of\n         * the run. If range.end or range.start is set to a negative value, null, or undefined, undefined is returned.\n         * @returns { Array<common2D.Point> } \tArray holding the position of each glyph relative to the respective line in\n         * the run.\n         * @syscap SystemCapability.Graphics.Drawing\n         * @since 18\n         */\n        getPositions(range: Range): Array<common2D.Point>;\n        /**\n       * Obtains the offset of each glyph in this run relative to its index.\n       * @returns { Array<common2D.Point> } Array holding the offset of each glyph in the run relative to its index.\n       * @syscap SystemCapability.Graphics.Drawing\n       * @since 12\n       */\n        getOffsets(): Array<common2D.Point>;\n        /**\n         * Obtains the Font object of this run.\n         * @returns { drawing.Font } Font object of this run.\n         * @syscap SystemCapability.Graphics.Drawing\n         * @since 12\n         */\n        getFont(): drawing.Font;\n        /**\n         * Paints this run on the canvas with the coordinate point (x, y) as the upper left corner.\n         * @param { drawing.Canvas } canvas - Target canvas.\n         * @param { number } x - X coordinate of the upper left corner. The value is a floating point number.\n         * @param { number } y - Y coordinate of the upper left corner. The value is a floating point number.\n         * @syscap SystemCapability.Graphics.Drawing\n         * @since 12\n         */\n        paint(canvas: drawing.Canvas, x: number, y: number): void;\n        /**\n         * Obtains an array of character indices for glyphs within a specified range of this run, where the indices are\n         * offsets relative to the entire paragraph.\n         * @param { Range } range - Range of the glyphs, where range.start indicates the start position of the range, and\n         * range.end indicates the length of the range. If the length is 0, the range is from range.start to the end of\n         * the run. If range.end or range.start is set to a negative value, null, or undefined, undefined is returned.\n         * If this parameter is not passed, the entire run is obtained.\n         * @returns { Array<number> } Array of character indices.\n         * @syscap SystemCapability.Graphics.Drawing\n         * @since 18\n         */\n        getStringIndices(range?: Range): Array<number>;\n        /**\n         * Obtains the range of glyphs generated by this run.\n         * @returns { Range } \tRange of the glyphs, where start indicates the start position of the range, which is the\n         * index relative to the entire paragraph, and end indicates the length of the range.\n         * @syscap SystemCapability.Graphics.Drawing\n         * @since 18\n         */\n        getStringRange(): Range;\n        /**\n         * Obtain the typographic boundaries of this run. These boundaries depend on the typographic font and font size,\n         * but not on the characters themselves. For example, for the string \" a b \" (which has a space before \"a\" and\n         * a space after \"b\"), the typographic boundaries include the spaces at the beginning and end of the line.\n         * @returns { TypographicBounds } Typographic boundaries of the run.\n         * @syscap SystemCapability.Graphics.Drawing\n         * @since 18\n         */\n        getTypographicBounds(): TypographicBounds;\n        /**\n         * Obtains the image boundary of this run. The image boundary, equivalent to a visual boundary, is related to the\n         * font, font size, and characters. For example, for the string \" a b \" (which has a space before \"a\" and a\n         * space after \"b\"), only \"a b\" are visible to users, and therefore the image boundary does not include these\n         * spaces at the beginning and end.\n         * @returns { common2D.Rect } Image boundary of the run.\n         * @syscap SystemCapability.Graphics.Drawing\n         * @since 18\n         */\n        getImageBounds(): common2D.Rect;\n    }\n    /**\n     * Describes the layout information and metrics for a continuous piece of text (a run) in a line of text.\n     * @typedef RunMetrics\n     * @syscap SystemCapability.Graphics.Drawing\n     * @since 12\n     */\n    interface RunMetrics {\n        /**\n         * The metrics of an Font.\n         * @type { TextStyle }\n         * @syscap SystemCapability.Graphics.Drawing\n         * @since 12\n         */\n        textStyle: TextStyle;\n        /**\n         * Describes text style.\n         * @type { drawing.FontMetrics }\n         * @syscap SystemCapability.Graphics.Drawing\n         * @since 12\n         */\n        fontMetrics: drawing.FontMetrics;\n    }\n    /**\n     * Describes the measurement information of a single line of text in the text layout.\n     * @typedef LineMetrics\n     * @syscap SystemCapability.Graphics.Drawing\n     * @since 12\n     */\n    interface LineMetrics {\n        /**\n         * Start index of the line in the text buffer.\n         * @type { number }\n         * @syscap SystemCapability.Graphics.Drawing\n         * @since 12\n         */\n        startIndex: number;\n        /**\n         * End index of the line in the text buffer.\n         * @type { number }\n         * @syscap SystemCapability.Graphics.Drawing\n         * @since 12\n         */\n        endIndex: number;\n        /**\n         * Ascent, that is, the distance from the baseline to the top of the character.\n         * @type { number }\n         * @syscap SystemCapability.Graphics.Drawing\n         * @since 12\n         */\n        ascent: number;\n        /**\n         * Descent, that is, the distance from the baseline to the bottom of the character.\n         * @type { number }\n         * @syscap SystemCapability.Graphics.Drawing\n         * @since 12\n         */\n        descent: number;\n        /**\n         * Height of the line, which is Math.round(ascent + descent).\n         * @type { number }\n         * @syscap SystemCapability.Graphics.Drawing\n         * @since 12\n         */\n        height: number;\n        /**\n         * Width of the line.\n         * @type { number }\n         * @syscap SystemCapability.Graphics.Drawing\n         * @since 12\n         */\n        width: number;\n        /**\n         * Left edge of the line. The right edge is the value of left plus the value of width.\n         * @type { number }\n         * @syscap SystemCapability.Graphics.Drawing\n         * @since 12\n         */\n        left: number;\n        /**\n         * Y coordinate of the baseline in the line relative to the top of the paragraph.\n         * @type { number }\n         * @syscap SystemCapability.Graphics.Drawing\n         * @since 12\n         */\n        baseline: number;\n        /**\n         * Line number, starting from 0.\n         * @type { number }\n         * @syscap SystemCapability.Graphics.Drawing\n         * @since 12\n         */\n        lineNumber: number;\n        /**\n         * Height from the top to the current line.\n         * @type { number }\n         * @syscap SystemCapability.Graphics.Drawing\n         * @since 12\n         */\n        topHeight: number;\n        /**\n         * Mapping between text index ranges and the FontMetrics associated with\n         * them. The first run will be keyed under start_index. The metrics here.\n         * are before layout and are the base values we calculate from.\n         * @type { Map<number, RunMetrics> }\n         * @syscap SystemCapability.Graphics.Drawing\n         * @since 12\n         */\n        runMetrics: Map<number, RunMetrics>;\n    }\n    /**\n     * Obtains the full names of all fonts of the specified type. This API uses a promise to return the result.\n     * @param { SystemFontType } fontType - System font type.\n     * @returns { Promise<Array<string>> } \tPromise used to return the full names of all fonts of the specified type.\n     * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;\n     * <br>2. Incorrect parameter types; 3. Parameter verification failed.\n     * @syscap SystemCapability.Graphics.Drawing\n     * @since 14\n     */\n    function getSystemFontFullNamesByType(fontType: SystemFontType): Promise<Array<string>>;\n    /**\n     * Obtains the font descriptor based on the font name and type. This API uses a promise to return the result.\n     * A font descriptor is a data structure that describes font features. It contains details of the font appearance and\n     * properties.\n     * @param { string } fullName - Font name, corresponding to the value of fullName in the name table of the\n     * corresponding font file. It is obtained by calling getSystemFontFullNamesByType.\n     * @param { SystemFontType } fontType - System font type.\n     * @returns { Promise<FontDescriptor> } Promise used to return the font descriptor.\n     * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;\n     * <br>2. Incorrect parameter types.\n     * @syscap SystemCapability.Graphics.Drawing\n     * @since 14\n     */\n    function getFontDescriptorByFullName(fullName: string, fontType: SystemFontType): Promise<FontDescriptor>;\n    /**\n     * Obtains all system font descriptors that match the provided font descriptor. This API uses a promise to return the\n     * result.\n     * @param { FontDescriptor } desc - Font descriptor to match against. If this parameter is left unspecified,\n     * all system font descriptors are returned. If a specific value is provided, the matching is performed based on\n     * <br.the value provided. If the matching fails, an empty array is returned.\n     * @returns { Promise<Array<FontDescriptor>> } Promise used to return all matched system font descriptors, and an\n     * empty array will be returned if the matching fails.\n     * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;\n     * <br>2. Incorrect parameter types; 3. Parameter verification failed.\n     * @syscap SystemCapability.Graphics.Drawing\n     * @since 18\n     */\n    function matchFontDescriptors(desc: FontDescriptor): Promise<Array<FontDescriptor>>;\n    /**\n     * Implements a paragraph-style text tab, which stores the alignment mode and position.\n     * @typedef TextTab\n     * @syscap SystemCapability.Graphics.Drawing\n     * @since 18\n     */\n    interface TextTab {\n        /**\n         * Alignment mode of the text following the tab character in a paragraph. It can be set to LEFT, RIGHT, and CENTER\n         * defined in TextAlign. Other enumerated values have the effect of left alignment. The default value is left\n         * alignment.\n         * @type { TextAlign }\n         * @syscap SystemCapability.Graphics.Drawing\n         * @since 18\n         */\n        alignment: TextAlign;\n        /**\n         * Alignment position of the text following the tab character. The value is a floating point number, in px.\n         * The minimum value is 1.0. When the value is less than 1.0, the tab character is replaced with a space.\n         * @type { number }\n         * @syscap SystemCapability.Graphics.Drawing\n         * @since 18\n         */\n        location: number;\n    }\n    /**\n     * Defines text rendering high contrast mode to enhance readability.\n     * @enum { number }\n     * @syscap SystemCapability.Graphics.Drawing\n     * @since 20\n     */\n    enum TextHighContrast {\n        /**\n         * Follow system's high contrast settings for text rendering.\n         * @syscap SystemCapability.Graphics.Drawing\n         * @since 20\n         */\n        TEXT_FOLLOW_SYSTEM_HIGH_CONTRAST,\n        /**\n         * Disables high contrast rendering regardless of system settings.\n         * @syscap SystemCapability.Graphics.Drawing\n         * @since 20\n         */\n        TEXT_APP_DISABLE_HIGH_CONTRAST,\n        /**\n         * Enable high contrast rendering regardless of system settings.\n         * @syscap SystemCapability.Graphics.Drawing\n         * @since 20\n         */\n        TEXT_APP_ENABLE_HIGH_CONTRAST\n    }\n    /**\n     * Sets high contrast mode of text rendering.\n     * @param { TextHighContrast } action - High contrast mode.\n     * @syscap SystemCapability.Graphics.Drawing\n     * @since 20\n     */\n    function setTextHighContrast(action: TextHighContrast): void;\n}\nexport default text;\n",
}
export default FILE;